

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="https://i.loli.net/2021/11/21/KLIcp3NhoymnFP2.jpg">
  <link rel="icon" href="https://i.loli.net/2021/11/21/KLIcp3NhoymnFP2.jpg">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="逝者如斯夫，不舍昼夜。">
  <meta name="author" content="余龙">
  <meta name="keywords" content="">
  <meta name="description" content="HTML&amp;CSS(二)1.优雅降级与渐进增强渐进增强（progressive enhancement）针对低版本浏览器进行构建项目，保证最基本的功能，然后再针对高级浏览器进行效果、交互等改进和追加功能达到更好的用户体验。 优雅降级（graceful degradation）一开始就构建完整的功能，然后再针对低版本浏览器进行兼容。 区别a.优雅降级是从复杂的现状开始，并试图减少用户体验的供给">
<meta property="og:type" content="article">
<meta property="og:title" content="HTML与CSS基础知识（二）">
<meta property="og:url" content="http://gis-yu.gitee.io/gis-yu/2022/04/10/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%BA%8C%EF%BC%89/index.html">
<meta property="og:site_name" content="YL&#39;Blog">
<meta property="og:description" content="HTML&amp;CSS(二)1.优雅降级与渐进增强渐进增强（progressive enhancement）针对低版本浏览器进行构建项目，保证最基本的功能，然后再针对高级浏览器进行效果、交互等改进和追加功能达到更好的用户体验。 优雅降级（graceful degradation）一开始就构建完整的功能，然后再针对低版本浏览器进行兼容。 区别a.优雅降级是从复杂的现状开始，并试图减少用户体验的供给">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-04-10T08:37:13.000Z">
<meta property="article:modified_time" content="2022-04-10T08:40:42.412Z">
<meta property="article:author" content="余龙">
<meta property="article:tag" content="HTML">
<meta property="article:tag" content="CSS">
<meta name="twitter:card" content="summary_large_image">
  
  <title>HTML与CSS基础知识（二） - YL&#39;Blog</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="/gis-yu/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/atom-one-dark.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/gis-yu/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"gis-yu.gitee.io","root":"/gis-yu/","version":"1.8.12","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname"}},"search_path":"/gis-yu/local-search.xml"};
  </script>
  <script  src="/gis-yu/js/utils.js" ></script>
  <script  src="/gis-yu/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 60vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/gis-yu/">
      <strong>YL&#39;Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/">
                <i class="iconfont icon-home-fill"></i>
                主页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/gis-yu/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://i.loli.net/2021/11/22/PJswpxfBROKm2M7.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="HTML与CSS基础知识（二）">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2022-04-10 16:37" pubdate>
        2022年4月10日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.9k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      6 分钟
    </span>
  

  
  
    
      <!-- 不蒜子统计文章PV -->
      <span id="busuanzi_container_page_pv" style="display: none">
        <i class="iconfont icon-eye" aria-hidden="true"></i>
        <span id="busuanzi_value_page_pv"></span> 次
      </span>
    
  
</div>

            
          </div>

          
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">HTML与CSS基础知识（二）</h1>
            
            <div class="markdown-body">
              <h1 id="HTML-amp-CSS-二"><a href="#HTML-amp-CSS-二" class="headerlink" title="HTML&amp;CSS(二)"></a>HTML&amp;CSS(二)</h1><h2 id="1-优雅降级与渐进增强"><a href="#1-优雅降级与渐进增强" class="headerlink" title="1.优雅降级与渐进增强"></a>1.优雅降级与渐进增强</h2><h3 id="渐进增强（progressive-enhancement）"><a href="#渐进增强（progressive-enhancement）" class="headerlink" title="渐进增强（progressive enhancement）"></a>渐进增强（progressive enhancement）</h3><p>针对低版本浏览器进行构建项目，保证最基本的功能，然后再针对高级浏览器进行效果、交互等改进和追加功能达到更好的用户体验。</p>
<h3 id="优雅降级（graceful-degradation）"><a href="#优雅降级（graceful-degradation）" class="headerlink" title="优雅降级（graceful degradation）"></a>优雅降级（graceful degradation）</h3><p>一开始就构建完整的功能，然后再针对低版本浏览器进行兼容。</p>
<h3 id="区别"><a href="#区别" class="headerlink" title="区别"></a>区别</h3><p>a.优雅降级是从复杂的现状开始，并试图减少用户体验的供给；渐进增强则是从一个非常基础的、能够起作用的版本开始，并不断扩充，以适应未来环境的需要。</p>
<p>b.渐进增强观点认为应该关注于内容本身，这使得渐进增强成为一种更为合理的设计范例；优雅降级观点认为应该针对那些最高级、最完善的浏览器来设计网站。</p>
<h2 id="2-重绘与重排"><a href="#2-重绘与重排" class="headerlink" title="2.重绘与重排"></a>2.重绘与重排</h2><h3 id="重绘"><a href="#重绘" class="headerlink" title="重绘"></a>重绘</h3><p>重绘是一个元素外观的改变所触发的浏览器行为（例如改变visibility、outline、background等属性），浏览器会根据元素的新属性重新绘制，使元素呈现新的外观。</p>
<h3 id="重排"><a href="#重排" class="headerlink" title="重排"></a>重排</h3><p>重排时更明显的一种改变，可以理解为渲染树需要重新计算。常见的触发重排的操作：</p>
<ul>
<li>DOM元素的几何属性变化</li>
<li>DOM树的结构变化（例如节点的增减、移动）</li>
<li>获取某些属性（例如offsetTop、offsetLeft、offsetHeight、offsetWidth、clientWidth，clientHeigth等）</li>
<li>改变元素的一些样式（例如调整浏览器窗口大小）</li>
</ul>
<h3 id="两者的区别"><a href="#两者的区别" class="headerlink" title="两者的区别"></a>两者的区别</h3><ul>
<li><p>重绘不会带来重新布局，并不一定会伴随着重排。</p>
</li>
<li><p>在实践中，应该尽量减少重排次数和缩小重排的影响范围。有以下几种方法：</p>
<figure class="highlight scss"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs scss">1.将多次改变样式属性的操作合并成一次操作<br><br>2.将需要多次重排的元素，<span class="hljs-attribute">position</span>属性设置为absolute或fixed，使其脱离文档流，这样它的变化就不会影响到其他元素<br><br>3.在内存中多次操作节点，完成后再添加到文档中去<br><br>4.如果要对一个元素进行复杂的操作，可以将其<span class="hljs-attribute">display</span>属性设置为<span class="hljs-attribute">none</span>时期隐藏，待操作完成后再显示<br><br>5.在需要经常获取那些引起浏览器重排的属性值时，要缓存到变量<br></code></pre></div></td></tr></table></figure></li>
</ul>
<h2 id="3-浮动和它的工作原理以及清除浮动的方法"><a href="#3-浮动和它的工作原理以及清除浮动的方法" class="headerlink" title="3.浮动和它的工作原理以及清除浮动的方法"></a>3.浮动和它的工作原理以及清除浮动的方法</h2><p><strong>浮动元素脱离文档流，不占据空间。</strong>浮动元素碰到包含它的边框或者浮动元素的边框停留。</p>
<h3 id="1-使用空标签清除浮动"><a href="#1-使用空标签清除浮动" class="headerlink" title="1.使用空标签清除浮动"></a>1.使用空标签清除浮动</h3><p>这总方法是在所有浮动标签后面添加一个空标签，定义css <code>clear：both</code>。弊端是增加了无意义的标签。</p>
<h3 id="2-使用after伪对象清除浮动"><a href="#2-使用after伪对象清除浮动" class="headerlink" title="2.使用after伪对象清除浮动"></a>2.使用after伪对象清除浮动</h3><p>该方法只适用于非IE浏览器。具体写法可参照以下示例。使用中需要注意以下几点。一、该方法中必须为需要清除浮动元素的伪对象中设置<code>height：0</code>，否则该元素会比实际高出若干像素。</p>
<figure class="highlight css"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs css"><span class="hljs-selector-id">#parent</span><span class="hljs-selector-pseudo">::after</span> &#123;<br>  <span class="hljs-attribute">content</span>:<span class="hljs-string">&#x27;&#x27;</span>;<br>  <span class="hljs-attribute">height</span>:<span class="hljs-number">0</span>;<br>  <span class="hljs-attribute">visibility</span>:hidden;<br>  <span class="hljs-attribute">display</span>:block;<br>  <span class="hljs-attribute">clear</span>:both;<br>&#125;<br></code></pre></div></td></tr></table></figure>

<h3 id="3-溢出隐藏"><a href="#3-溢出隐藏" class="headerlink" title="3.溢出隐藏"></a>3.溢出隐藏</h3><figure class="highlight css"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs css"><span class="hljs-attribute">overflow</span>: hidden;<br></code></pre></div></td></tr></table></figure>

<h3 id="4-浮动外部元素"><a href="#4-浮动外部元素" class="headerlink" title="4.浮动外部元素"></a>4.浮动外部元素</h3><h2 id="4-如何让一个盒子在页面垂直水平居中"><a href="#4-如何让一个盒子在页面垂直水平居中" class="headerlink" title="4.如何让一个盒子在页面垂直水平居中"></a>4.如何让一个盒子在页面垂直水平居中</h2><h3 id="方法一：已知宽高"><a href="#方法一：已知宽高" class="headerlink" title="方法一：已知宽高"></a>方法一：已知宽高</h3><figure class="highlight css"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs css"><span class="hljs-selector-tag">div</span> &#123;<br>  <span class="hljs-attribute">position</span>:absolute;<br>  <span class="hljs-attribute">left</span>:<span class="hljs-number">0</span>;<br>  <span class="hljs-attribute">right</span>:<span class="hljs-number">0</span>;<br>  <span class="hljs-attribute">top</span>:<span class="hljs-number">0</span>;<br>  <span class="hljs-attribute">bottom</span>:<span class="hljs-number">0</span>;<br>  <span class="hljs-attribute">margin</span>:auto;<br>&#125;<br></code></pre></div></td></tr></table></figure>

<h3 id="方法二：未知宽高"><a href="#方法二：未知宽高" class="headerlink" title="方法二：未知宽高"></a>方法二：未知宽高</h3><figure class="highlight css"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs css"><span class="hljs-selector-tag">div</span> &#123;<br>  <span class="hljs-attribute">position</span>:absolute;<br>  <span class="hljs-attribute">left</span>:<span class="hljs-number">50%</span>;<br>  <span class="hljs-attribute">top</span>:<span class="hljs-number">50%</span>;<br>  <span class="hljs-attribute">transform</span>:<span class="hljs-built_in">translate</span>(-<span class="hljs-number">50%</span>,-<span class="hljs-number">50%</span>);<br>&#125;<br></code></pre></div></td></tr></table></figure>

<h2 id="5-前端性能优化方案"><a href="#5-前端性能优化方案" class="headerlink" title="5.前端性能优化方案"></a>5.前端性能优化方案</h2><ol>
<li>减少DOM操作</li>
<li>部署前，图片压缩，代码压缩</li>
<li>优化js代码结构，减少冗余代码</li>
<li>减少http请求，合理设置HTTP缓存</li>
<li>使用内容分发CDN加速</li>
<li>静态资源缓存</li>
<li>图片延迟加载</li>
</ol>
<h2 id="6-CSS选择器优先级顺序"><a href="#6-CSS选择器优先级顺序" class="headerlink" title="6.CSS选择器优先级顺序"></a>6.CSS选择器优先级顺序</h2><ul>
<li>ID选择器，如#id{}</li>
<li>类选择器，如.class{}</li>
<li>属性选择器，如a[href=”<a href="http://www.baidu.com&quot;]{}">www.baidu.com&quot;]{}</a></li>
<li>伪类选择器，如:hover{}</li>
<li>伪元素选择器，如::before{}</li>
<li>标签选择器，如span{}</li>
<li>通配选择器，如*{}</li>
</ul>
<h2 id="7-CSS3的新特性"><a href="#7-CSS3的新特性" class="headerlink" title="7.CSS3的新特性"></a>7.CSS3的新特性</h2><figure class="highlight css"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs css"><span class="hljs-attribute">border-radius</span>  圆角<br><span class="hljs-attribute">box-shadow</span>  阴影<br><span class="hljs-attribute">text-shadow</span>  文字阴影<br>gradient  线性渐变<br><span class="hljs-attribute">transform</span>  旋转、缩放、移动或倾斜<br>scale  缩放<br>translate  位移<br>媒体查询   多栏布局   多背景<br></code></pre></div></td></tr></table></figure>

<h2 id="8-什么是空元素"><a href="#8-什么是空元素" class="headerlink" title="8.什么是空元素"></a>8.什么是空元素</h2><p>即没有内容的HTML元素，例如：</p>
<figure class="highlight html"><table><tr><td class="gutter hljs"><div class="hljs code-wrapper"><pre><span class="line">1</span><br></pre></div></td><td class="code"><div class="hljs code-wrapper"><pre><code class="hljs html"><span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>、<span class="hljs-tag">&lt;<span class="hljs-name">meta</span>&gt;</span>、<span class="hljs-tag">&lt;<span class="hljs-name">hr</span>&gt;</span>、<span class="hljs-tag">&lt;<span class="hljs-name">link</span>&gt;</span>、<span class="hljs-tag">&lt;<span class="hljs-name">input</span>&gt;</span>、<span class="hljs-tag">&lt;<span class="hljs-name">img</span>&gt;</span><br></code></pre></div></td></tr></table></figure>


            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/gis-yu/categories/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80/">前端基础</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/gis-yu/tags/HTML/">HTML</a>
                    
                      <a class="hover-with-bg" href="/gis-yu/tags/CSS/">CSS</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/gis-yu/2022/04/11/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%89%EF%BC%89/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">HTML与CSS基础知识（三）</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/gis-yu/2022/03/29/HTML%E4%B8%8ECSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%88%E4%B8%80%EF%BC%89/">
                        <span class="hidden-mobile">HTML与CSS基础知识（一）</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments" lazyload>
                
                  
                
                
  <div id="valine"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#valine', function() {
      Fluid.utils.createScript('https://cdn.jsdelivr.net/npm/valine@1/dist/Valine.min.js', function() {
        var options = Object.assign(
          {"appId":"zQGDUUOQ9QfQCdRUzRjf2EL9-gzGzoHsz","appKey":"HTVcqUu3ul0Gtn1zPLYul6yt","path":"window.location.pathname","placeholder":"留下你的评论吧~","avatar":"retro","meta":["nick","mail","link"],"requiredFields":[],"pageSize":10,"lang":"zh-CN","highlight":true,"recordIP":false,"serverURLs":"","emojiCDN":null,"emojiMaps":null,"enableQQ":false},
          {
            el: "#valine",
            path: window.location.pathname
          }
        )
        new Valine(options);
        Fluid.utils.waitElementVisible('#valine .vcontent', () => {
          Fluid.plugins.initFancyBox('#valine .vcontent img:not(.vemoji)');
        })
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/gis-yu/js/events.js" ></script>
<script  src="/gis-yu/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/gis-yu/js/local-search.js" ></script>



  
    <script  src="/gis-yu/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/gis-yu/js/boot.js" ></script>


<!-- hexo injector body_end start -->
<link rel="stylesheet" href="/css/customize.css">
<!-- hexo injector body_end end --></body>
</html>
